package o;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class fmt {
    public static Object ˎ(Class cls, Object obj, String str) {
        try {
            Field declaredField = cls.getDeclaredField(str);
            declaredField.setAccessible(true);
            return declaredField.get(obj);
        } catch (IllegalAccessException e) {
            fmq.ˎ("RefectUtil.getFieldValue Error1 " + e.getMessage());
            return null;
        } catch (NoSuchFieldException e2) {
            fmq.ˎ("RefectUtil.getFieldValue Error2 " + e2.getMessage());
            return null;
        }
    }

    public static Field ˊ(Class cls, String str) {
        try {
            Field declaredField = cls.getDeclaredField(str);
            declaredField.setAccessible(true);
            return declaredField;
        } catch (NoSuchFieldException e) {
            fmq.ˎ("RefectUtil.getFieldValue Error2 " + e.getMessage());
            return null;
        }
    }

    public static Object ॱ(Field field, Object obj) {
        if (field != null) {
            try {
                return field.get(obj);
            } catch (IllegalAccessException e) {
                fmq.ˎ("ReflectionUtils.getDeclareFieldValue Error22" + e.getMessage());
            }
        }
        return null;
    }

    public static void ˏ(Class cls, Object obj, String str, Object obj2) {
        try {
            Field declaredField = cls.getDeclaredField(str);
            declaredField.setAccessible(true);
            declaredField.set(obj, obj2);
        } catch (IllegalAccessException e) {
            fmq.ˎ("RefectUtil.setFieldValue Error1 " + e.getMessage());
        } catch (NoSuchFieldException e2) {
            fmq.ˎ("RefectUtil.setFieldValue Error2 " + e2.getMessage());
        }
    }

    public static Object ˏ(Class cls, Object obj, String str, Object... objArr) {
        Class[] clsArr = null;
        if (objArr != null) {
            Class[] clsArr2 = new Class[objArr.length];
            for (int i = 0; i < objArr.length; i++) {
                clsArr2[i] = objArr[i].getClass();
            }
            clsArr = clsArr2;
        }
        Method declaredMethod = cls.getDeclaredMethod(str, clsArr);
        declaredMethod.setAccessible(true);
        return declaredMethod.invoke(obj, objArr);
    }

    public static Object ॱ(Class cls, Object obj, String str, Class[] clsArr, Object... objArr) {
        try {
            Method declaredMethod = cls.getDeclaredMethod(str, clsArr);
            declaredMethod.setAccessible(true);
            return declaredMethod.invoke(obj, objArr);
        } catch (Exception e) {
            fmq.ˎ("RefectUtil.invokeNoException Error " + e.getMessage());
            return null;
        }
    }
}
